package cn.hdu.liang.generics;

public class Holder3<T> {
    private T a;

    public Holder3(T a) {
        this.a = a;
    }

    public void set(T a) {
        this.a = a;
    }

    public T get() {
        return a;
    }

    public static void main(String[] args) {
        Holder3<Automobile> h2 = new Holder3(new Automobile());
        Automobile a = (Automobile) h2.get();
        //h2.set("Not an Automobile");
        //h2.set(1);
    }
}
